/**
 * Created by 000188 on 2016/6/30.
 */
import React from 'react';
let Logo = require('logo');
let Note = require('note');
let Btn = require('btn');
let Content = require('content');
var CollarWelfare = require('user-form');
var MobileForm = require('mobile-form');

var Rule = React.createClass({
    render(){
        return <div>
            <Logo />
            <Note noteText={this.state.noteText} />
            <Btn width="100%" text="　　我要抢红包　　" click={this.toScene} />
            <Btn width="100%" text="　　我要领福利　　" click={this.toScene2} />
        </div>
    },
    toScene(){
        Content.render(<MobileForm />);
    },
    toScene2(){
        Content.render(<CollarWelfare/>);
    },
    getInitialState(){
        return {
            noteText:{
                list:[],
                title:''
            }
        }
    },
    componentDidMount(){
        require(['config'],Config=>{
            this.setState({
                noteText:Config.rule
            })
        })
    }

})

module.exports = Rule;